pub fn remove_duplicates(nums: &mut Vec<i32>) -> i32 {
    let len = nums.len();
    let mut i = 0usize;
    let mut j = 1usize;
    while j < len {
        if nums[i] != nums[j] {
            i += 1;
            nums[i] = nums[j];
        }
        j += 1;
    }
    return (i + 1) as i32;
}
